﻿<UserControl x:Class="MTBrainStorm.Views.TouchInkCanvas"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
             xmlns:Commands="clr-namespace:MTBrainStorm.Framework.Commands;assembly=MTBrainStorm.Framework" xmlns:s="clr-namespace:Microsoft.Surface.Presentation.Controls;assembly=Microsoft.Surface.Presentation" xmlns:Gestures="clr-namespace:Blake.NUI.WPF.Gestures;assembly=Blake.NUI.WPF" xmlns:Converters="clr-namespace:MTBrainStorm.Framework.Converters;assembly=MTBrainStorm.Framework" mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.Resources>
        <Converters:BooleanToSurfaceInkEditingModeConverter x:Key="BooleanToSurfaceInkEditingModeConverter1" />
        <BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter1" />
    </UserControl.Resources>
    <Grid>
        <StackPanel>
            <s:SurfaceInkCanvas Gestures:Events.TapGesture="TapGesture" Width="{Binding Width}" Height="{Binding Height}" EditingMode="{Binding Path=CanDraw, Converter={StaticResource BooleanToSurfaceInkEditingModeConverter1}}" />
            <s:SurfaceButton Width="35" Height="35" Visibility="{Binding CanDraw, Converter={StaticResource BooleanToVisibilityConverter1}}" Padding="5">
                <Interactivity:Interaction.Triggers>
                    <Interactivity:EventTrigger EventName="Click">
                        <Commands:InvokeCommand Command="{Binding StopEditing}" />
                    </Interactivity:EventTrigger>
                </Interactivity:Interaction.Triggers>
                <Image Source="/MTBrainStorm;component/Resources/accept-48.png" />
            </s:SurfaceButton>
        </StackPanel>
    </Grid>
</UserControl>
